package com.woniu.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.entity.PageBean;
import com.woniu.entity.ProApprove;
import com.woniu.entity.Project;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author hyl
 * @since 2022-08-28
 */
public interface IProApproveService extends IService<ProApprove> {
    PageBean<ProApprove> getByPage(ProApprove proApprove, int page,int pageSize);
    void add(ProApprove proApprove);
    List<ProApprove> getAll();
    void update(ProApprove proApprove);
    ProApprove getByProApproveId(int approveId);

    List<ProApprove> getProApproveByProId(int proId);


    List<ProApprove> getByCondition(ProApprove proApprove);

    Integer getNumsByProStatusAndProId(Project project,String appProStatus);

    List<ProApprove> getProApproveByProStatusAndProId(Project project,String appProStatus);

    //根据用户ID,以及审批表状态来查项目
    List<ProApprove> findByUId(int uid);

    //根据项目id,再来查审批表状态为不通过的
    ProApprove getProAppNotPassByProId(int proId);

    //根据项目id,再来查审批表状态为审批中的
    ProApprove getProAppProcessingByProId(int proId);

    //创建审批表
    void insertProApprove(ProApprove proApprove);

    //重新提交审批表
    void reSubmitProApprve(ProApprove proApprove);

    //审批通过
    //app_approve_time-->aatime
    //app_feedback-->afeedback
    void Apass(int proid,String aatime,String afeedback);

    //审批未通过
    //app_approve_time-->aatime
    //app_feedback-->afeedback
    void Aunpass(int proid,String aatime,String afeedback);

}
